package tech.yunjing.train.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import tech.yunjing.train.util.JsonResult;

/**
 * 接收异常信息
 */
public abstract class BaseController {
 
	@ExceptionHandler(Exception.class)
	@ResponseBody
	public JsonResult<Object> expHandler(Exception e) {
		e.printStackTrace();
		return new JsonResult<Object>(e);
	}

}